package com.yourname.bank_sim.menu;

import com.yourname.bank_sim.DataStore;
import com.yourname.bank_sim.action.BuyAction;
import com.yourname.bank_sim.action.RouteAction;
import com.yourname.bank_sim.action.StationAction;
import com.yourname.bank_sim.entity.Station;

import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Scanner;

/**
 * 菜单类，此项目的菜单结构比较简单，所以就用这一个类即可
 */
public class Menu {
    private static Scanner scanner=new Scanner(System.in);

    public static void menu(){
        while (true){
            System.out.println("""
                1. 车站管理
                2. 线路管理
                3. 购票
                4. 退出
                """);
            int i = scanner.nextInt();
            if (i==4){
                break;
            }
            switch (i){
                case 1-> StationAction.menu();
                case 2-> RouteAction.menu();
                case 3-> BuyAction.menu();
            }
        }

    }
}
